package cn.tedu.spring;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
//@Component：通用组件注解
//@Controller：应该添加在“控制器类”上
//@Service：应该添加在“业务类”上
//@Repository：应该添加在“数据存取类”上
public class UserMapper {
    @PostConstruct
    public void init(){
        System.out.println("\tUserMapper.init()");
    }
    @PreDestroy
    public void destroy(){
        System.out.println("\tUserMapper.destroy()");
    }
}
